List Folder
The List Folder command returns a list of every file and folder in a specified folder or volume. List Folder is one of several commands provided by the File Commands scripting addition.SYNTAX
list folder referenceToFolderPARAMETER
- referenceToFolder
- A reference of the form
file
nameString,alias nameString
, orfolder
nameString (see "Notes").
Class: Reference or stringRESULT
A list of strings.EXAMPLE
list folder "My Disk:"--result: {"Letters", "Current", "Projects", "Aliases"}NOTES
To specify the name (nameString) of a folder, use a string of the form"Disk:Folder1:Folder2:...:FolderName"
as described in Chapter 5, "Objects and References," of the AppleScript Language Guide. If you specify only the name of the folder (FolderName) instead of its entire pathname, AppleScript attempts to find the folder in the current directory.ERRORS